cmake_minimum_required(VERSION 3.1)
project(MahjongPyWrapper)

set(LIB_MahjongPy ${PROJECT_NAME})
file(GLOB_RECURSE MahjongPy_SRC_CPP *.cpp)
add_library(${LIB_MahjongPy} SHARED ${MahjongPy_SRC_CPP})
if (UNIX)
    if (APPLE)
        set_target_properties(${LIB_MahjongPy} PROPERTIES SUFFIX ".so")
    endif(APPLE)
    set_target_properties(${LIB_MahjongPy} PROPERTIES PREFIX "")
elseif(WIN32)
    if (NOT MSVC)
        set_target_properties(${LIB_MahjongPy} PROPERTIES PREFIX "")
    endif()
    set_target_properties(${LIB_MahjongPy} PROPERTIES SUFFIX ".pyd")
endif(UNIX)

target_link_libraries(${LIB_MahjongPy} MahjongCore ${PYTHON_LIBRARIES} fmt tenhou_shuffle)
